#!/bin/sh
cd `dirname $0`
echo $1
myname=${0##*/}
echo ${myname}

ps -aef | grep -P "$1" | grep -Pv grep | grep -Pv $myname
pscount=`ps -aef | grep -P "$1" | grep -Pv grep | grep -Pv $myname | wc -l`
echo pscount=${pscount}
if [ ${pscount} -gt 0 ]
then
   echo ok
   exit 0
else
   echo notexists
   exit 1
fi
